// import Vue from 'vue'
// import Antd from 'ant-design-vue';
// import ElementUI from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';
// import 'material-design-icons-iconfont/dist/material-design-icons.css';
// import 'mavon-editor/dist/css/index.css';

import App from './App.vue'
import router from './router'
import store from './store'
import './assets/css/global.css'
import vuetify from './plugins/vuetify'
import mavonEditor from 'mavon-editor'
import 'ant-design-vue/dist/antd.less'

import VueCoreVideoPlayer from 'vue-core-video-player'

import '@/common/font/font.css';

Vue.config.productionTip = false

Vue.prototype.$messageBus = new Vue()

Vue.prototype.sendWarnMessage = function(msg){
  this.$message.warn({ content: msg,
    icon: () =>
      this.$createElement("a-icon", {
        props: {
          type: "frown"
        }
      }),
    top: '100px',
    duration: 1
  })
}

Vue.prototype.sendSuccessMessage = function(msg){
  this.$message.success({ content: msg,
    icon: () =>
      this.$createElement("a-icon", {
        props: {
          type: "smile"
        }
      }),
    top: '100px',
    duration: 1
  })
}

Vue.use(VueLazyload)
Vue.use(mavonEditor)
Vue.use(VueCoreVideoPlayer)
Vue.use(ELEMENT)
Vue.prototype.$eleMessage = Vue.prototype.$message
Vue.use(antd)

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

new Vue({
  router,
  store,
  vuetify,
  render: h => h(App)
}).$mount('#app')
